#include "Utils.h"

Utils::Utils(void)
{
}

Utils::~Utils(void)
{
}

void Utils::Deserialize( const string& file_name,Persistable* persistable )
{
  Serializer* serializer= CreateSerializer(file_name);
  serializer->Deserialization(persistable);
  delete serializer;
  serializer = NULL;
}

void Utils::Serialize( const string& file_name,Persistable* persistable )
{
  Serializer* serializer= CreateSerializer(file_name);
  serializer->Serialization(persistable);
  delete serializer;
  serializer = NULL;
}

Serializer* Utils::CreateSerializer( const string& file_name )
{
  return new XmlFileSerializer(file_name);
}
